package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Region;
import cn.wolfcode.trip.base.query.StrategyQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RegionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Region record);

    Region selectByPrimaryKey(Long id);

    List<Region> selectAll();

    int updateByPrimaryKey(Region record);
    //mybatis语法:如果传单个参数,而参数在SQL进行if判断,就必须使用@Param宝转成map
    List<Region> getRegionByParentId(@Param("parentId") Long parentId);

    List<Region> list(@Param("state") int state);
}